﻿<Window x:Class="Wallace.IDE.SalesForce.UI.EditCheckpointWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:system="clr-namespace:System;assembly=mscorlib"
        xmlns:salesForceData="clr-namespace:SalesForceData;assembly=SalesForceData"
        Title="New Checkpoint" 
        Height="400" 
        Width="550"
        MinHeight="200"
        MinWidth="200"        
        WindowStartupLocation="CenterOwner"
        ResizeMode="NoResize"
        Style="{StaticResource ChromeWindowStyle}"
        Background="{StaticResource CaptionBackgroundBrush}">
    
    <Window.Resources>
        <ObjectDataProvider x:Key="checkpointScriptTypeEnum" 
                            MethodName="GetValues"
                            ObjectType="{x:Type system:Enum}">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="salesForceData:CheckpointScriptType"/>
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
    </Window.Resources>

    <Border Margin="10">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <TextBlock Grid.Row="0"
                   Grid.Column="0"
                   Margin="5"
                   Text="File:"
                   HorizontalAlignment="Right"
                   FontWeight="Bold" />

            <TextBlock x:Name="textBlockFileName"
                   Grid.Row="0"
                   Grid.Column="1"
                   Margin="5" />

            <TextBlock Grid.Row="1"
                   Grid.Column="0"
                   Margin="5"
                   Text="Line:"
                   HorizontalAlignment="Right"
                   FontWeight="Bold" />

            <TextBlock x:Name="textBlockLineNumber"
                   Grid.Row="1"
                   Grid.Column="1"
                   Margin="5" />

            <TextBlock Grid.Row="2"
                   Grid.Column="0"
                   Margin="5"
                   Text="Iteration:"
                   HorizontalAlignment="Right"
                   FontWeight="Bold" />

            <TextBox x:Name="textBoxIteration"
                     Grid.Row="2"
                     Grid.Column="1"
                     Margin="5" 
                     Text="1"/>

            <TextBlock Grid.Row="3"
                   Grid.Column="0"
                   Margin="5"
                   Text="Heap Dump:"
                   HorizontalAlignment="Right"
                   FontWeight="Bold" />

            <CheckBox x:Name="checkBoxHeapDump"
                  Grid.Row="3"
                  Grid.Column="1"
                  Margin="5" />

            <TextBlock Grid.Row="4"
                       Grid.Column="0"
                       Margin="5"
                       Text="Script Type:"
                       HorizontalAlignment="Right"
                       FontWeight="Bold" />

            <ComboBox x:Name="comboBoxScriptType"
                      Grid.Row="4"
                      Grid.Column="1"
                      Margin="5"
                      HorizontalAlignment="Stretch"
                      SelectedIndex="0"
                      ItemsSource="{Binding Source={StaticResource checkpointScriptTypeEnum}}" />

            <TextBlock Grid.Row="5"
                   Grid.Column="0"
                   Margin="5"
                   Text="Script:"
                   HorizontalAlignment="Right"
                   FontWeight="Bold" />

            <TextBox x:Name="textBoxScript"
                 Grid.Row="5"
                 Grid.Column="1"
                 Margin="5"
                 AcceptsReturn="True" />

            <StackPanel Grid.Row="6"
                    Grid.Column="1"
                    Orientation="Horizontal"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Bottom">

                <Button x:Name="buttonCreate"
                        Margin="5"
                        Padding="10,5,10,5"
                        Click="buttonCreate_Click">Create</Button>

                <Button Margin="5"
                    Padding="10,5,10,5"
                    Click="buttonCancel_Click">Cancel</Button>

            </StackPanel>

        </Grid>
    </Border>
</Window>
